<script type="text/javascript">
var show = $("#show");

function appendShow(item) {
    show.append(item);
    console.log(show[0].scrollHeight);
    var h = show[0].scrollHeight;
    show.scrollTop(h);
        
}   

function appendErr(item) {
    show.append(item);
    console.log(show[0].scrollHeight);
    show.scrollTop(show[0].scrollHeight);
}

function MyShow(content,time,img){
    var data = '<a class="weui-cell weui-cell_access" href="javascript:;" style="margin-top: 25px;margin-bottom: 2px;">'+
        '<div class="weui-cell__bd weui-cell_primary" style="margin-left: 10px;">'+
        '    <p style="float: right;margin-right: 10px;">'+content+'</p>'+
        '<br><span style="font-size:7px;float: right;">'+time+'</span>'+
        '</div>'+
        '<div class="weui-cell__hd">'+
        '    <img src="'+img+'" alt="" style="width:40px;margin-left: 4px;display:block">'+
        '</div>'+
        '</a>';
    appendShow(data)
}

function YouShow(content, name, time, img){
    var data = '<a class="weui-cell weui-cell_access" href="javascript:;" style="margin-top: 25px;margin-bottom: 25px;">'+
        '<div class="weui-cell__hd">'+
        '    <span style="font-size: 12px;">'+name+'</span> '+
        '    <img src="'+img+'" alt="" style="width:40px;margin-right:4px;display:block">'+
        '</div>'+
        '<div class="weui-cell__bd weui-cell_primary" style="margin-left: 10px;">'+
        '    <p>'+content+'</p>'+
        '<br><span style="font-size:7px;float: left;">'+time+'</span>'+
        '</div>'+
        '</a>';
    appendShow(data)
}

function MyShow1vs1(content, time, img){
    var data = '<a class="weui-cell weui-cell_access" href="javascript:;" style="margin-top: 25px;margin-bottom: 25px;">'+
        '<div class="weui-cell__bd weui-cell_primary" style="margin-left: 10px;">'+
        '    <p style="float: right;margin-right: 10px;">'+content+'</p>'+
        '<br><span style="font-size:7px;float: right;">'+time+'</span>'+
        '</div>'+
        '<div class="weui-cell__hd">'+
        '    <img src="'+img+'" alt="" style="width:40px;margin-left: 4px;display:block">'+
        '</div>'+
        '</a>';
    appendShow(data)
}

function YouShow1vs1(content, time, img){
    var data = '<a class="weui-cell weui-cell_access" href="javascript:;" style="margin-top: 25px;margin-bottom: 25px;">'+
        '<div class="weui-cell__hd">'+
        '    <img src="'+img+'" alt="" style="width:40px;margin-right:4px;display:block">'+
        '</div>'+
        '<div class="weui-cell__bd weui-cell_primary" style="margin-left: 10px;">'+
        '    <p style="float: left;">'+content+'</p>'+
        '<br><span style="font-size:7px;float: left;">'+time+'</span>'+
        '</div>'+
        '</a>';
    appendShow(data)
}
</script>
